<!--隐患排查制度-->
<!--安全生产责任制度-->
<include file="public@header"/>
</head>
<!--onselectstart ='return false'  禁止选中-->
<body  style="background-color: #E5F3E6">
<div class="wrap">
	{$textInfo}
	<input type="button" value="保存" onclick="textTest()" />
	
</div>
<script src="__STATIC__/js/admin.js"></script>
    <script id="container" name="content" type="text/plain"> </script>
    <!-- 配置文件 -->
    <script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
    <!-- 实例化编辑器 -->
    <script type="text/javascript">
        var ue = UE.getEditor('container');
		ue.ready(function() {
    //设置编辑器的内容
    ue.setContent('hello');
    //获取html内容，返回: <p>hello</p>
    var html = ue.getContent();
    //获取纯文本内容，返回: hello
    var txt = ue.getContentTxt();
});

    </script>
    <script>
     	function textTest(){
     		 var html = ue.getContent();
     		$.ajax({
	        url:"/index.php/admin/Ressim/ajaxText",
	        data:{id:html},
	        type:"post",
	        dataType:"json",
	        success: function(data){
	        	var text = JSON.parse(data);
	        	alert(text);
	        	ue.setContent(text);
	        }
	    });
     }
    </script>
</body>
</html>